home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / macintosh-c / macc-carbon-demos-nonbinhex.sit / macc-carbon-demos-nonbinhex / ReadMe on OS 9 next >
Text File  |  2002-01-09  |  9KB  |  122 lines

  1. Demonstration Program Folders and Files
  2.  
  3. The demonstration programs were written using Metrowerks CodeWarrior for Mac OS, Professional Edition, Version 6.2.  Resource files were created using Resorcerer 2.2 and 2.4. 
  4.  
  5. Document files utilised by certain demonstration programs are located in the folder Mac C Carbon Demo Documents, which is located in the folder Mac C Carbon Demos.  The first word in each document file title is the name of the demonstration program which the file supports.
  6.  
  7. For Mac OS 8/9, you should simply copy the folder Mac C Carbon Demos to a convenient location on your hard drive.  For Mac OS X, you should copy the folder titled Mac C Carbon Demos to the Applications folder and the folder titled Mac C Carbon Demo Documents to the relevant user's Documents folder.
  8.  
  9. The Menus2 demonstration program incorporates a demonstration of Apple Help, including the methodology used to create an item in the Mac OS 8/9 Help menu.  The Apple Guide file titled Menus Guide, which will cause a "Menus Help" item to be created in the Mac OS 8/9 Help menu, should be retained in the folder Menus2.   That folder also contains an alias of the folder Menus Help.  The alias should be placed:
  10.  
  11. •   In the Help folder in the System Folder on Mac OS 8/9.
  12.  
  13. •   In the user's Help folder (~/Library/Documentation/Help) on Mac OS X.
  14.  
  15. You will then be able to access the help content by choosing Menus Help from the Menus2 program's Help menu.
  16.  
  17. Note that the prefix file, which appears by default in the Prefix File edit text item in the Settings dialog box (Language Settings/C/C++ Language section) has been deleted in all CodeWarrior projects.
  18.  
  19. Running the Programs
  20.  
  21. Before running a demonstration program, you should read the top section of the source code comments in the relevant chapter in the book (or, for the post-Chapter 17 Classic event model versions, in the PDF files located in the relevant demo program folder).  For most programs, this explains what to do, what to expect, and what to note.
  22.  
  23. All of the demonstration programs may be run from within CodeWarrior with the exception of the program AppleEvents (Chapter 10).  By its nature, this program must be run as a built (that is, double-clickable) application.  The demonstration program Files (Chapter 18) may be run within CodeWarrior, although certain aspects of the program can only be explored by running it as a built application.
  24.  
  25. Note that the human interface guidelines for Mac OS 8/9 are inconsistent with those for Mac OS X when it comes to such matters as, for example, the required spacing between controls in dialogs.  The demonstration programs observe the Mac OS X (Aqua) guidelines where these inconsistencies occur.
  26.  
  27. IDE and System Preparation
  28.  
  29. If the version of CodeWarrior you are using includes a version of the Universal Headers earlier than Version 3.4.1  and/or the version of CarbonLib in your Mac OS 8/9 Extensions folder is earlier than 1.4 (or does not exist), you should download the CarbonLib SDK (Software Development Kit) Version 1.4GM (or later) from http://developer.apple.com/carbon/ and:
  30.  
  31. •   Replace the existing folder CIncludes in Metrowerks CodeWarrior / Mac OS Support
  32.      / Universal / Interfaces with the one in the Carbon Support folder in the SDK folder.
  33.  
  34. •   Copy the extension CarbonLib from the Implementation Libraries folder in the SDK
  35.      folder to the Mac OS 8/9 Extensions folder (replacing the existing version if it exists)
  36.      and restart your computer.
  37.  
  38. •   Copy the two stub libraries CarbonLib and CarbonFrameWorkLib from the 
  39.      CarbonLib folder in the SDK folder to Metrowerks CodeWarrior / Mac OS Support /
  40.      Universal / Libraries / StubLibraries, replacing the existing versions if they exist.
  41.  
  42. Known Issues on Mac OS 8/9 (CarbonLib 1.4)
  43.  
  44. As of CarbonLib Version 1.4, the only known issue affecting the demonstration programs has to do with the system-managed Window menu in applications using the Carbon event model.  In applications which use the Classic event model (e.g., the demonstration programs Windows2 and MLTETextEditor), the second item in the Window menu toggles between "Collapse Window" and "Uncollapse Window".  However, in applications which use the Carbon event model (e.g., the demonstration program CarbonEvents2, "Collapse Window" and "Uncollapse Window" are two separate menu items.
  45.  
  46. Known Issues on Mac OS X 10.0.4
  47.  
  48. As of Mac OS X 10.0.4, known issues are as follows:
  49.  
  50. •   In Carbon applications, there is a problem with window-modal dialogs and alerts
  51.     (sheets) causing applications to occasionally crash when the sheet is invoked.  This 
  52.      affects the demonstration programs DialogsAndAlerts, CarbonEvents2, and Files.  Also,
  53.      in Carbon applications, sheets are not translucent.  (It is understood that both of these
  54.      issues will be resolved in a future Mac OS X release.)
  55.  
  56. •   The titles of pop-up menu button controls do not dim when the controls are deactivated.
  57.  
  58. •   There is no support for Help tags for menus.
  59.  
  60. •   In the demonstration programs AppleEvents, Files, and MLTETextEditor, the version
  61.      information in the 'plst' resource is not used by the Finder.  Instead the Finder uses
  62.      the information in the 'vers' resource.  (It is understood that this will not occur on
  63.      Mac OS X 10.1.)
  64.  
  65. •   In the demonstration program GWorldPicCursIcn, the function GetPictInfo, called in 
  66.      the function doPicture, returns incorrect information regarding the number of
  67.      rectangles, ovals, strings, etc.
  68.  
  69. •   In the demonstration program Controls3, scrolling of the auto-scrolling text box is
  70.      very slow.  This is because this control does not yet have a built-in timer.
  71.  
  72. •   In the demonstration programs CarbonEvents2 and MonoTextEdit, the calls to
  73.      QuitAppModalLoopForWindow will not re-enable the menus disabled by the associated
  74.      calls to RunAppModalLoopForWindow.  It is expected that this problem will not occur
  75.      on Mac OS X 10.1.  For versions of Mac OS X earlier than 10.1, you can eliminate
  76.      the problem by making the following changes:
  77.  
  78.      •    In the demonstration program CarbonEvents2, in the source code file Dialogs.c,
  79.            move the call to DisposeWindow from immediately after the call to 
  80.            QuitAppModalLoopForWindow in the function dialogEventHandler to immediately
  81.            after the call to RunAppModalLoopForWindow in the function
  82.            doMovableModalDialog.
  83.     
  84.      •    In the demonstration program MonoTextEdit (Carbon event model version), in the
  85.            source code file HelpDialog.c, move the calls to doCloseHelp and
  86.            doDisposeDescriptors from immediately after the call to
  87.            QuitAppModalLoopForWindow in the function helpWindowEventHandler to
  88.            immediately after the call to RunAppModalLoopForWindow in the function doHelp.
  89.  
  90. •   In the demonstration program MLTETextEditor, scrolling of text is jerky and erratic.
  91.  
  92. Notes on 'plst' Resources
  93.  
  94. Of necessity, all demonstration programs contain a 'plst' resource.  The following notes are additional to the information on 'plst' resources contained in the book.
  95.  
  96. Resorcerer Version 2.4  is provided in two versions:
  97.  
  98. •   Resorcerer 2.4 PPC, the "Classic" version which you should use if you are running
  99.      Mac OS 8/9.
  100.  
  101. •   Resorcerer 2.4 OSX, the "Carbonised" version which you should use if you are 
  102.      running Mac OS X, and which you may also use, with certain limitations, if you are
  103.      running on Mac OS 8/9.
  104.  
  105. Resorcerer 2.4 PPC has a bug which prevents you from opening 'plst' resources.  Accordingly, to open and edit 'plst' resources, use Resorcerer 2.4 OSX.
  106.  
  107. As stated at Chapter 10, you can create a complete 'plst' resource by simply typing the information property list in a text editor and copying and pasting the listing into an empty 'plst' resource using Resorcerer.  To check the construction of the listing, you can save it to a text editor file and, on Mac OS X, start the Terminal application and use the "pl" utility  to check the listing by entering:
  108.  
  109.     pl <name of file>
  110.  
  111. As an alternative method of creating and editing an information property list, you can use the PropertyListEditor application located in Mac OS X's Developer folder.
  112.  
  113. When you make changes to a 'plst' resource, you may need to perform the Mac OS X equivalent of rebuilding the desktop database in order for the changes to be recognized by the Desktop.  To do this, open the user's folder and, in the directory  ~/Library/Preferences, delete the files LSApplications, LSClaimedTypes, and LSSchemes.  Then log out and log back in.
  114.  
  115.  
  116.     
  117.  
  118.  
  119.  
  120.  
  121.  
  122.